<template>
  <view class="msgdetail">
    <view class="hander">
      <img src="../../static/zuo1.png" alt="" class="goback" @click="goback" />
      <img src="../../static/chat1.png" alt="" class="photo" />
      <text>新农人</text>
    </view>
    <view class="msglist">
      <view class="msgitem">
        <view class="time">03-27 10：16</view>
        <view class="item_msg_left">
          <image src="../../static/chat1.png" alt="" class="photo" />
          <view class="msg">可以的,没问题</view>
        </view>
        <view class="item_msg_right">
          <text class="msg">可以的,没问题</text>
          <image src="../../static/chat1.png" alt="" class="photo" />
        </view>
        <view class="item_msg_left">
          <image src="../../static/chat1.png" alt="" class="photo" />
          <view class="msg">可以的,没问题</view>
        </view>
        <view class="item_msg_right">
          <text class="msg">可以的,没问题</text>
          <image src="../../static/chat1.png" alt="" class="photo" />
        </view>
      </view>
    </view>
    <view class="send">
      <input type="text" class="inp" placeholder="请输入..." />
      <button class="btn">发送</button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    goback() {
      uni.navigateBack();
    },
  },
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}

page {
  background-color: #f8f8f8;
}

.msgdetail {
  font-family: "Poppins";
  background-color: #f8f8f8;
  
}

.hander {
  display: flex;
  align-items: center;
  padding: 120rpx 30rpx 20rpx 10rpx;
  background-color: #fff;
  

  .goback {
    width: 40rpx;
    height: 40rpx;
    margin-right: 20rpx;
  }

  .photo {
    width: 80rpx;
    height: 80rpx;
    margin-right: 20rpx;
  }
}

.msglist {
  width: 100%;
  min-height: calc(100vh - 300rpx);
  background-color: #f8f8f8;
  padding: 30rpx 30rpx 100rpx 30rpx;

  .msgitem {
    .time {
      text-align: center;
      font-size: 20rpx;
      color: #adadad;
    }

    .item_msg_left {
      display: flex;
      align-items: center;

      .photo {
        width: 90rpx;
        height: 90rpx;
        margin-right: 20rpx;
      }

      .msg {
        background-color: #fff;
        padding: 15rpx;
        border-radius: 15rpx;
        font-size: 26rpx;
      }
    }

    .item_msg_right {
      width: 100%;
      display: flex;
      align-items: center;
      // text-align: right;
      padding-left: 400rpx;

      .photo {
        width: 90rpx;
        height: 90rpx;
        margin-left: 20rpx;
      }

      .msg {
        background-color: #fff;
        padding: 15rpx;
        border-radius: 15rpx;
        font-size: 26rpx;
      }
    }
  }
}

.send {
  position: fixed;
  bottom: 0rpx;
  width: 100%;
  height: 200rpx;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30rpx 10rpx;
  box-sizing: border-box;
  box-shadow: 0rpx -8rpx 8rpx 0rpx #f0f0f0;

  .inp {
    width: 80%;
    height: 80rpx;
    border-radius: 40rpx;
    background-color: #f8f8f8;
    padding-left: 20rpx;
    font-size: 30rpx;
  }

  .btn {
    width: 120rpx;
    height: 60rpx;
    text-align: center;
    line-height: 60rpx;
    border: none;
    background-color: #eea427;
    font-size: 30rpx;
    color: #fff;
  }
}
</style>